.class public final Lcn/cheln/explorer/ds/b/a;
.super Ljava/lang/Object;


# static fields
.field private static a:Landroid/content/ContentValues;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    new-instance v0, Landroid/content/ContentValues;

    invoke-direct {v0}, Landroid/content/ContentValues;-><init>()V

    sput-object v0, Lcn/cheln/explorer/ds/b/a;->a:Landroid/content/ContentValues;

    return-void
.end method

.method public static declared-synchronized a(Lcn/cheln/explorer/beans/FileInfo;Lcn/cheln/support/images/f;)Landroid/content/ContentValues;
    .locals 9

    const-string v1, ""

    const-class v2, Lcn/cheln/explorer/ds/b/a;

    monitor-enter v2

    :try_start_0
    sget-object v1, Lcn/cheln/explorer/ds/b/a;->a:Landroid/content/ContentValues;

    invoke-virtual {v1}, Landroid/content/ContentValues;->clear()V

    invoke-virtual {p0}, Lcn/cheln/explorer/beans/FileInfo;->p()Ljava/io/File;

    move-result-object v1

    sget-object v3, Lcn/cheln/explorer/ds/b/a;->a:Landroid/content/ContentValues;

    const-string v4, "_data"

    invoke-virtual {v1}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v3, v4, v5}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    sget-object v3, Lcn/cheln/explorer/ds/b/a;->a:Landroid/content/ContentValues;

    const-string v4, "format"

    invoke-virtual {v1}, Ljava/io/File;->isDirectory()Z

    move-result v5

    if-eqz v5, :cond_2

    const/16 v5, 0x3001

    :goto_0
    invoke-static {v5}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v5

    invoke-virtual {v3, v4, v5}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Integer;)V

    sget-object v3, Lcn/cheln/explorer/ds/b/a;->a:Landroid/content/ContentValues;

    const-string v4, "sort_key"

    iget-object v5, p0, Lcn/cheln/explorer/beans/FileInfo;->sortKey:Ljava/lang/String;

    if-eqz v5, :cond_0

    iget-object v5, p0, Lcn/cheln/explorer/beans/FileInfo;->sortKey:Ljava/lang/String;

    invoke-virtual {v5}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v5

    const-string v6, ""

    invoke-virtual {v5, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v5

    if-eqz v5, :cond_3

    :cond_0
    invoke-virtual {v1}, Ljava/io/File;->getName()Ljava/lang/String;

    move-result-object v5

    invoke-static {v5}, Lcn/cheln/explorer/ds/scan/e;->a(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v5

    :goto_1
    invoke-virtual {v3, v4, v5}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    sget-object v3, Lcn/cheln/explorer/ds/b/a;->a:Landroid/content/ContentValues;

    const-string v4, "title"

    invoke-virtual {v1}, Ljava/io/File;->getName()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v3, v4, v5}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    sget-object v3, Lcn/cheln/explorer/ds/b/a;->a:Landroid/content/ContentValues;

    const-string v4, "_size"

    invoke-virtual {v1}, Ljava/io/File;->length()J

    move-result-wide v5

    invoke-static {v5, v6}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v5

    invoke-virtual {v3, v4, v5}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Long;)V

    sget-object v3, Lcn/cheln/explorer/ds/b/a;->a:Landroid/content/ContentValues;

    const-string v4, "date_modified"

    invoke-virtual {v1}, Ljava/io/File;->lastModified()J

    move-result-wide v5

    const-wide/16 v7, 0x3e8

    div-long/2addr v5, v7

    invoke-static {v5, v6}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v1

    invoke-virtual {v3, v4, v1}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Long;)V

    sget-object v1, Lcn/cheln/explorer/ds/b/a;->a:Landroid/content/ContentValues;

    const-string v3, "mime_type"

    iget-object v4, p1, Lcn/cheln/support/images/f;->e:Ljava/lang/String;

    invoke-virtual {v1, v3, v4}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    instance-of v1, p0, Lcn/cheln/explorer/beans/MusicInfo;

    if-eqz v1, :cond_1

    sget-object v3, Lcn/cheln/explorer/ds/b/a;->a:Landroid/content/ContentValues;

    const-string v4, "album_id"

    move-object v0, p0

    check-cast v0, Lcn/cheln/explorer/beans/MusicInfo;

    move-object v1, v0

    iget-object v1, v1, Lcn/cheln/explorer/beans/MusicInfo;->album_id:Ljava/lang/Integer;

    invoke-virtual {v3, v4, v1}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Integer;)V

    const-string v3, ""

    new-instance v4, Ljava/lang/StringBuilder;

    const-string v1, "------------ aa "

    invoke-direct {v4, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    move-object v0, p0

    check-cast v0, Lcn/cheln/explorer/beans/MusicInfo;

    move-object v1, v0

    iget-object v1, v1, Lcn/cheln/explorer/beans/MusicInfo;->album_id:Ljava/lang/Integer;

    invoke-virtual {v4, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v3, v1}, Lcn/cheln/support/app/c;->a(Ljava/lang/String;Ljava/lang/String;)V

    sget-object v1, Lcn/cheln/explorer/ds/b/a;->a:Landroid/content/ContentValues;

    const-string v3, "album_artist_id"

    check-cast p0, Lcn/cheln/explorer/beans/MusicInfo;

    iget-object v4, p0, Lcn/cheln/explorer/beans/MusicInfo;->album_artist_id:Ljava/lang/Integer;

    invoke-virtual {v1, v3, v4}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Integer;)V

    :cond_1
    sget-object v1, Lcn/cheln/explorer/ds/b/a;->a:Landroid/content/ContentValues;
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    monitor-exit v2

    return-object v1

    :cond_2
    const/16 v5, 0x3000

    goto/16 :goto_0

    :cond_3
    :try_start_1
    iget-object v5, p0, Lcn/cheln/explorer/beans/FileInfo;->sortKey:Ljava/lang/String;
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    goto :goto_1

    :catchall_0
    move-exception v1

    monitor-exit v2

    throw v1
.end method

.method public static declared-synchronized a(Ljava/io/File;)Landroid/content/ContentValues;
    .locals 7

    const-class v0, Lcn/cheln/explorer/ds/b/a;

    monitor-enter v0

    :try_start_0
    sget-object v1, Lcn/cheln/explorer/ds/b/a;->a:Landroid/content/ContentValues;

    invoke-virtual {v1}, Landroid/content/ContentValues;->clear()V

    sget-object v1, Lcn/cheln/explorer/ds/b/a;->a:Landroid/content/ContentValues;

    const-string v2, "_data"

    invoke-virtual {p0}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v1, v2, v3}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    sget-object v1, Lcn/cheln/explorer/ds/b/a;->a:Landroid/content/ContentValues;

    const-string v2, "title"

    invoke-virtual {p0}, Ljava/io/File;->getName()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v1, v2, v3}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    sget-object v1, Lcn/cheln/explorer/ds/b/a;->a:Landroid/content/ContentValues;

    const-string v2, "_size"

    invoke-virtual {p0}, Ljava/io/File;->length()J

    move-result-wide v3

    invoke-static {v3, v4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v3

    invoke-virtual {v1, v2, v3}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Long;)V

    sget-object v1, Lcn/cheln/explorer/ds/b/a;->a:Landroid/content/ContentValues;

    const-string v2, "date_modified"

    invoke-virtual {p0}, Ljava/io/File;->lastModified()J

    move-result-wide v3

    const-wide/16 v5, 0x3e8

    div-long/2addr v3, v5

    invoke-static {v3, v4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v3

    invoke-virtual {v1, v2, v3}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Long;)V

    sget-object v1, Lcn/cheln/explorer/ds/b/a;->a:Landroid/content/ContentValues;

    const-string v2, "mime_type"

    invoke-virtual {p0}, Ljava/io/File;->getName()Ljava/lang/String;

    move-result-object v3

    invoke-static {v3}, Lcn/cheln/support/app/a;->d(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v3

    invoke-static {v3}, Lcn/cheln/support/app/a;->g(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v1, v2, v3}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    sget-object v1, Lcn/cheln/explorer/ds/b/a;->a:Landroid/content/ContentValues;

    const-string v2, "format"

    invoke-virtual {p0}, Ljava/io/File;->isDirectory()Z

    move-result v3

    if-eqz v3, :cond_0

    const/16 v3, 0x3001

    :goto_0
    invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v3

    invoke-virtual {v1, v2, v3}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Integer;)V

    sget-object v1, Lcn/cheln/explorer/ds/b/a;->a:Landroid/content/ContentValues;

    const-string v2, "sort_key"

    invoke-virtual {p0}, Ljava/io/File;->getName()Ljava/lang/String;

    move-result-object v3

    invoke-static {v3}, Lcn/cheln/explorer/ds/scan/e;->a(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v1, v2, v3}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    sget-object v1, Lcn/cheln/explorer/ds/b/a;->a:Landroid/content/ContentValues;
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    monitor-exit v0

    return-object v1

    :cond_0
    const/16 v3, 0x3000

    goto :goto_0

    :catchall_0
    move-exception v1

    monitor-exit v0

    throw v1
.end method
